#! /usr/bin/python
import sys, string

while 1:
	data = sys.stdin.readline().split()
	if len(data) > 1:
		if data[1]=="function":
			print string.join(data[4:-1])+';'
	else:
		break
